import logging
import yagmail

def log_set():
    logging.basicConfig(filemode="a+",
                        filename="log.log",
                        format="%(message)s-%(threadName)s-%(thread)d-%(levelno)s",
                        level=logging.DEBUG)

def sent_email(file):
    em=yagmail.SMTP(user="2834326498@qq.com",password="ygjjxpwwggovdcia",host="smtp.qq.com")
    em.send(to="2834326498@qq.com",subject="5.16",contents="day20",attachments=file)